package com.ruoyi.project.menzhen.service.impl;

import com.ruoyi.project.menzhen.domain.User;
import com.ruoyi.project.menzhen.mapper.MenzhenUserMapper;
import com.ruoyi.project.menzhen.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private MenzhenUserMapper menzhenUserMapper;
    @Override
    public List<User> selectUserList(User user) {
        return menzhenUserMapper.selectUserList(user);
    }

    @Override
    public int insertUser(User user) {
        user.setCreateTime(new Date());
        user.setStatus(1);
        return menzhenUserMapper.insertUser(user);
    }
    @Override
    public int updateUser(User user) {
        return menzhenUserMapper.updateUser(user);
    }

    @Override
    public User selectUserById(Long userId) {
        return menzhenUserMapper.selectUserById(userId);
    }


}
